package com.itheima.demo;

public class Demo01 {
    public static void main(String[] args) {
        String[] strings = {"奥迪A7","小米手机","劳斯莱斯5元代金券","咸鱼一条","谢谢参与"};
        for (int i = 0; i < 10; i++) {
            int a = randomMethod(strings.length);
            System.out.println(strings[a]);
        }
    }

    private static int randomMethod(int length) {
        //return (int)Math.floor(Math.random()*length);
        return (int)(Math.random()*length);
    }
}
